Setup code for Clang types in SIL.#33541
Merged
varungandhi-apple merged 10 commits intoswiftlang:masterfrom Aug 28, 2020
Merged
Setup code for Clang types in SIL.#33541varungandhi-apple merged 10 commits intoswiftlang:masterfrom
varungandhi-apple merged 10 commits intoswiftlang:masterfrom
Conversation
1b84f8f to
fd6df87
Compare
This comment has been minimized.
This comment has been minimized.
2 tasks
This comment has been minimized.
This comment has been minimized.
5 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4b629f7 to
520db9f
Compare
Contributor
Author
|
Rebased on top of master to unblock later PR. @swift-ci please smoke test |
slavapestov
reviewed
Aug 24, 2020
include/swift/AST/ExtInfo.h
Outdated
Contributor
There was a problem hiding this comment.
Assert that diffKind fits inside DifferentiabilityMask?
Contributor
Author
There was a problem hiding this comment.
Hmm, should we do this consistently for all the fields? For example, representation takes two bits. I imagine we could have a Last = 3 case there (and a Last = 2 case for DifferentiabilityKind) and then have a static_assert(std::bit_width(DifferentiabilityKind::Last) == std::bit_width(DifferentiabilityMask)).
Contributor
Author
There was a problem hiding this comment.
(Leaving this open for discussion. Will fix this in a follow-up PR based on what you think about the question ^.)
520db9f to
d70182e
Compare
This comment has been minimized.
This comment has been minimized.
This translation is a pre-requisite to storing Clang types in SILFunctionType.
d70182e to
3f39e8a
Compare
This comment has been minimized.
This comment has been minimized.
3f39e8a to
f11ddd6
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
We could've stored a function pointer or a block pointer or a function reference.
…ants. Invariants should be checked only when calling build(), not when the builder itself is created.
At all call-sites, the extInfo passed as the third argument is computed directly from the second argument, so we compute it directly in getBridgedFunctionType.
f11ddd6 to
c4ad840
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
Random failures on macOS and Linux. 😠 @swift-ci please clean test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working on rebasing #33085, I realized that the changes are just too much for one PR. So this is a separate PR breaking out the first two commits + some cleanup.